home *** CD-ROM | disk | FTP | other *** search
- -- card: 7595 from stack: in
- -- bmap block id: 7986
- -- flags: 4000
- -- background id: 7184
- -- name: a,b,c known
- ----- HyperTalk script -----
- on mouseUp
- set numberFormat to <0.000000>
-
- --Calculate s
- get card field "Side a"
- put it into mem1
- get card field "Side b"
- put it into mem2
- get card field "Side c"
- put it into mem3
- get (mem1+mem2+mem3)/2
- put it into mem4
- put it into card field "s"
-
- --Calculate K
- get sqrt(((mem4-mem1)*(mem4-mem2)*(mem4-mem3))/mem4)
- put it into mem5
- put it into card field "K"
-
- --Calculate Angle A
- get atan(mem5/(mem4-mem1))*360/pi
- put it into mem6
- put it into card field "angle A"
-
- --Calculate Angle B
- get atan(mem5/(mem4-mem2))*360/pi
- put it into mem7
- put it into card field "angle B"
-
- --Calculate Angle C
- get atan(mem5/(mem4-mem3))*360/pi
- put it into mem8
- put it into card field "angle C"
-
- --Calculate Area
- get (card field "side a"+card field "side b"+card field "side c")/2
- put it into mem9
- get sqrt(mem9*(mem9-card field "side a")*(mem9-card field "side b") *(mem9-card field "side c"))
- put it into bkgnd field "Area"
-
- --Calculate Perimeter
- get card field "side a"+card field "side b"+card field "side c"
- put it into bkgnd field "Perimeter"
- end mouseUp
-
-
- -- part 2 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=245 top=82 right=101 bottom=373
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle B
-
-
- -- part 3 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=299 top=215 right=234 bottom=427
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle C
-
-
- -- part 4 (field)
- -- low flags: 01
- -- high flags: 0004
- -- rect: left=22 top=215 right=234 bottom=150
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 256
- -- line height: 16
- -- part name: angle A
-
-
- -- part 5 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=51 top=137 right=154 bottom=184
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side c
-
-
- -- part 6 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=305 top=146 right=163 bottom=433
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side a
-
-
- -- part 7 (field)
- -- low flags: 00
- -- high flags: 0002
- -- rect: left=112 top=263 right=280 bottom=240
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: side b
-
-
- -- part 9 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=406 top=53 right=65 bottom=466
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: s
-
-
- -- part 10 (field)
- -- low flags: 01
- -- high flags: 0001
- -- rect: left=406 top=66 right=78 bottom=466
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 9
- -- style flags: 0
- -- line height: 12
- -- part name: K
-
-
- -- part contents for card part 6
- ----- text -----
- 2
-
- -- part contents for card part 7
- ----- text -----
- 3
-
- -- part contents for card part 5
- ----- text -----
- 4
-
- -- part contents for card part 9
- ----- text -----
- 4.500000
-
- -- part contents for card part 10
- ----- text -----
- 0.645497
-
- -- part contents for card part 4
- ----- text -----
- 28.955024
-
- -- part contents for card part 2
- ----- text -----
- 46.567463
-
- -- part contents for card part 3
- ----- text -----
- 104.477512
-
- -- part contents for background part 3
- ----- text -----
- 9.000000
-
- -- part contents for background part 5
- ----- text -----
- 2.904738